import 'package:flutter/material.dart';
import 'package:short_video_app/entity/profile/own_video_list_entity.dart';
import 'package:short_video_app/network/base_entity.dart';
import 'package:short_video_app/network/http_manager.dart';
import 'package:short_video_app/ui/widgets/custom_refresh_mixin.dart';
import 'package:short_video_app/utils/hud_util.dart';

class LikeVideoListViewModel extends ChangeNotifier with CustomRefreshMixin {
  @override
  Future<List> requestList(int page) async {
    List tempL = [];
    // Map<String, dynamic> params = {};
    // params["size"] = 10;
    // params["current"] = page;
    //
    // IBaseEntity? result = await HttpManager.getInstance().request(url: "/api/app/user/myVideo", params: params);
    //
    // if (result?.isSuccess() == true) {
    //   OwnVideoListEntity listResult = OwnVideoListEntity.fromJson(result?.getData());
    //   List<OwnVideoEntity>? temps = listResult.list;
    //   if (temps != null) {
    //     tempL.addAll(temps);
    //   }
    //   hasNext = listResult.hasNext ?? false;
    // } else {
    //   HudUtil.toast(result?.getMsg() ?? "");
    // }

    HudUtil.toast('开发中...敬请期待');

    return tempL;
  }

  @override
  void onRequestComplete() {
    notifyListeners();
  }
}
